<template>
  <div class="row">
    <h1 class = "h1">{{
      userInfor.isInit ? '请搜索用户' : 
      userInfor.isSearch ? '正在搜索中...' : 
      userInfor.isSuccess ? '查询不到该用户...' : ''
    }}</h1>

    <!-- 当上面条件都不满足说明数据请求成功了 -->
    <!-- 拿到数据遍历生成Item 并把对应的数据传递给Item -->
    <Item v-for ="user in userInfor.userList" :key="user.id" v-bind="user"/>
    
  </div>
</template>

<script>
import Item from "./Item";
export default {
  name: "List",
  components: { Item },
  props:["userInfor"],
};
</script>

<style scoped>
.h1{
  text-align: center;
}
</style>